﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.Odbc;
/// <summary>
/// Jsons_PageData1 的摘要说明
/*
	wxyJS V2.0 CS#辅助class
	wxyJS V2.0开发编写者：辛酉戊戌戊寅（网络用户），中国居民身份证号： 230104198110270213。
	wxyJS V2.0开发起始期：2015年1月1日
	wxyJS V2.0开发结束日期：持续更新中……
	wxyJS V2.0遵循开源协议 Apache License 标准。请后续使用者了解Apache License 标准后使用。
	使用提示：
		1、本文件为wxyJS V2.0的C#辅助组成部分，与wxyJS V2.0遵循开源协议 Apache License 标准。
        2、本文件需要拷贝到项目App_Code文件夹下使用。
*/
/// </summary>
public class wxyS_SQLsDataJsons_1
{
    public wxyS_SQLsDataJsons_1()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
    }//Jsons_PageData1







    #region C# NEWTONSOFT.JSON读取json数据连接文件文件

    /*
    public RootObject JsonStr1()
    {
        String Str1 = "";
        StreamReader sr = File.OpenText(@"" + HttpContext.Current.Server.MapPath("~").ToString() + @"\File\Data_xx.json");
        String nextLine;
        while ((nextLine = sr.ReadLine()) != null)
        {
            Str1 = Str1 + nextLine;
        }
        sr.Close();
        RootObject N_rb1 = JsonConvert.DeserializeObject<RootObject>(Str1.ToString());
        return N_rb1;
    }//JsonStr1
    */

    public RootObject JsonRO1(String CS1)
    {
        String Str1 = "";
        //StreamReader sr = File.OpenText(@"" + HttpContext.Current.Server.MapPath("~").ToString() + @"\File\Data_xx.json");
        StreamReader sr = File.OpenText(@"" + HttpContext.Current.Server.MapPath("~").ToString() + CS1.ToString());
        String nextLine;
        while ((nextLine = sr.ReadLine()) != null)
        {
            Str1 = Str1 + nextLine;
        }
        sr.Close();
        RootObject N_rb1 = JsonConvert.DeserializeObject<RootObject>(Str1.ToString());
        return N_rb1;
    }//JsonRO1


    public class MySql_1
    {
        public string server { get; set; }
        public string user { get; set; }
        public string password { get; set; }
        public string dbname { get; set; }
    }
    public class Sqltiel_1
    {
        public string server { get; set; }
        public string user { get; set; }
        public string password { get; set; }
        public string dbname { get; set; }
    }

    public class MSSql_1
    {
        public string server { get; set; }
        public string user { get; set; }
        public string password { get; set; }
        public string dbname { get; set; }
    }
    public class MSAcc_1
    {
        public string server { get; set; }
        public string user { get; set; }
        public string password { get; set; }
        public string dbname { get; set; }
    }

    public class standardcode
    {
        public string Sys_cut { get; set; }
        public string sys_code { get; set; }
        public string sys_agent { get; set; }
        public string sys_datetime { get; set; }
        public string sys_number { get; set; }
        public string sys_userstr { get; set; }
        public string sys_software { get; set; }
        public string sys_tailcode { get; set; }
    }//

    public class RootObject
    {
        public MySql_1 MySql_1 { get; set; }
        public Sqltiel_1 Sqltiel_1 { get; set; }
        public MSSql_1 MSSql_1 { get; set; }
        public MSAcc_1 MSAcc_1 { get; set; }
        public standardcode standardcode { get; set; }
    }
    #endregion


   




}// class Jsons_PageData1